import {request}  from "../utils/request.js";

//添加到购物车
export const addCartAPI = (data) => {
  return request({
        url: '/cart/add',
        method: 'post',
        data
    })
}


//获取购物车数据
export  const getCartAPI = () => {
    return request({
        url: '/cart/query',
        method: 'post',
    })
}

//从购物车移除
export const removeCartAPI = (cartId) => {
  return request({
        url: `/cart/delete/${cartId}`,
        method: 'post',
    })
}